<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: prodir.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">prodir.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Unified interface to <a class="el" href="prodir_8h.html#a34c915efb231ba61f1c88e12792f6104" title="Find first file that matches the pattern. ">qfindfirst()</a>,<a class="el" href="prodir_8h.html#a36e876f6d07ce60f6d81013998df084b" title="Find next file that matches the pattern. ">qfindnext()</a>,<a class="el" href="prodir_8h.html#a4188629837fd5ba62ea616b479cd4a24" title="Stop the file enumeration and free internal structures. ">qfindclose()</a> functions. </p>
<p>These are low level functions, it is better to use <a class="el" href="diskio_8hpp.html#ae85c4ea312c786873aebf704c289f57a" title="Enumerate files in the specified directory. ">enumerate_files()</a>. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structqffblk__t.html">qffblk_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">file statistics returned by qfind()-like functions  <a href="structqffblk__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structqffblk64__t.html">qffblk64_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Common structure with 64-bit ff_fsize - see <a class="el" href="structqffblk__t.html" title="file statistics returned by qfind()-like functions ">qffblk_t</a>.  <a href="structqffblk64__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a34c915efb231ba61f1c88e12792f6104"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a34c915efb231ba61f1c88e12792f6104">qfindfirst</a> (const char *pattern, struct <a class="el" href="structqffblk64__t.html">qffblk64_t</a> *blk, int attr)</td></tr>
<tr class="memdesc:a34c915efb231ba61f1c88e12792f6104"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find first file that matches the pattern.  <a href="#a34c915efb231ba61f1c88e12792f6104">More...</a><br /></td></tr>
<tr class="separator:a34c915efb231ba61f1c88e12792f6104"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36e876f6d07ce60f6d81013998df084b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a36e876f6d07ce60f6d81013998df084b">qfindnext</a> (struct <a class="el" href="structqffblk64__t.html">qffblk64_t</a> *blk)</td></tr>
<tr class="memdesc:a36e876f6d07ce60f6d81013998df084b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find next file that matches the pattern.  <a href="#a36e876f6d07ce60f6d81013998df084b">More...</a><br /></td></tr>
<tr class="separator:a36e876f6d07ce60f6d81013998df084b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4188629837fd5ba62ea616b479cd4a24"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a4188629837fd5ba62ea616b479cd4a24">qfindclose</a> (struct <a class="el" href="structqffblk64__t.html">qffblk64_t</a> *blk)</td></tr>
<tr class="memdesc:a4188629837fd5ba62ea616b479cd4a24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the file enumeration and free internal structures.  <a href="#a4188629837fd5ba62ea616b479cd4a24">More...</a><br /></td></tr>
<tr class="separator:a4188629837fd5ba62ea616b479cd4a24"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a25e6e0629b308db2527fd7c733f01cb7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25e6e0629b308db2527fd7c733f01cb7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>__FAT__</b></td></tr>
<tr class="separator:a25e6e0629b308db2527fd7c733f01cb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93d5fc3492cf382a8baf9afdb5191d6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93d5fc3492cf382a8baf9afdb5191d6d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a93d5fc3492cf382a8baf9afdb5191d6d">SDIRCHAR</a>&#160;&#160;&#160;&quot;\\&quot;</td></tr>
<tr class="memdesc:a93d5fc3492cf382a8baf9afdb5191d6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Path separator as a string. <br /></td></tr>
<tr class="separator:a93d5fc3492cf382a8baf9afdb5191d6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73b21cdd9b4bb805759be61704dd29d9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73b21cdd9b4bb805759be61704dd29d9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a73b21cdd9b4bb805759be61704dd29d9">DIRCHAR</a>&#160;&#160;&#160;'\\'</td></tr>
<tr class="memdesc:a73b21cdd9b4bb805759be61704dd29d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Path separator. <br /></td></tr>
<tr class="separator:a73b21cdd9b4bb805759be61704dd29d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3f29acb37b2e2ed252a7ae71dba709f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab3f29acb37b2e2ed252a7ae71dba709f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#ab3f29acb37b2e2ed252a7ae71dba709f">DRVCHAR</a>&#160;&#160;&#160;':'</td></tr>
<tr class="memdesc:ab3f29acb37b2e2ed252a7ae71dba709f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Windows drive separator. <br /></td></tr>
<tr class="separator:ab3f29acb37b2e2ed252a7ae71dba709f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae68482fd7f40f367568932dc1852992e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae68482fd7f40f367568932dc1852992e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#ae68482fd7f40f367568932dc1852992e">EXTCHAR</a>&#160;&#160;&#160;'.'</td></tr>
<tr class="memdesc:ae68482fd7f40f367568932dc1852992e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extension character is '.' for all systems. <br /></td></tr>
<tr class="separator:ae68482fd7f40f367568932dc1852992e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d1edde91ea515b363277f4bbdc3244d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d1edde91ea515b363277f4bbdc3244d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a2d1edde91ea515b363277f4bbdc3244d">MAXPATH</a>&#160;&#160;&#160;260</td></tr>
<tr class="memdesc:a2d1edde91ea515b363277f4bbdc3244d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size limit of <a class="el" href="structqffblk__t.html#aecdd25f99c49651a8885a7b563bde94f" title="file path ">qffblk_t::ff_name</a>. <br /></td></tr>
<tr class="separator:a2d1edde91ea515b363277f4bbdc3244d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51624f5c4d3f1e9e250c2fed331898d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51624f5c4d3f1e9e250c2fed331898d7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a51624f5c4d3f1e9e250c2fed331898d7">FA_RDONLY</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="memdesc:a51624f5c4d3f1e9e250c2fed331898d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">File cannot be opened for writing. <br /></td></tr>
<tr class="separator:a51624f5c4d3f1e9e250c2fed331898d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a005f0037a09b83890953d02482c4e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a005f0037a09b83890953d02482c4e1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a7a005f0037a09b83890953d02482c4e1">FA_DIREC</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="memdesc:a7a005f0037a09b83890953d02482c4e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Directory. <br /></td></tr>
<tr class="separator:a7a005f0037a09b83890953d02482c4e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1ac5de79bc1de27d8fd61a5fc836948"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1ac5de79bc1de27d8fd61a5fc836948"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#ab1ac5de79bc1de27d8fd61a5fc836948">FA_ARCH</a>&#160;&#160;&#160;0x20</td></tr>
<tr class="memdesc:ab1ac5de79bc1de27d8fd61a5fc836948"><td class="mdescLeft">&#160;</td><td class="mdescRight">File has not been backed up. <br /></td></tr>
<tr class="separator:ab1ac5de79bc1de27d8fd61a5fc836948"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b462e34da18f2383c10b3006dd9669c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5b462e34da18f2383c10b3006dd9669c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a5b462e34da18f2383c10b3006dd9669c">MAXDRIVE</a>&#160;&#160;&#160;_MAX_DRIVE</td></tr>
<tr class="memdesc:a5b462e34da18f2383c10b3006dd9669c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max drive name size. <br /></td></tr>
<tr class="separator:a5b462e34da18f2383c10b3006dd9669c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18dca71f9c1cfae749d91ee885e5d0b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18dca71f9c1cfae749d91ee885e5d0b3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a18dca71f9c1cfae749d91ee885e5d0b3">MAXDIR</a>&#160;&#160;&#160;_MAX_DIR</td></tr>
<tr class="memdesc:a18dca71f9c1cfae749d91ee885e5d0b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max directory name size. <br /></td></tr>
<tr class="separator:a18dca71f9c1cfae749d91ee885e5d0b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a714b2485a6dd312e37226e1f833728a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a714b2485a6dd312e37226e1f833728a9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a714b2485a6dd312e37226e1f833728a9">MAXFILE</a>&#160;&#160;&#160;_MAX_FNAME</td></tr>
<tr class="memdesc:a714b2485a6dd312e37226e1f833728a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max file name size. <br /></td></tr>
<tr class="separator:a714b2485a6dd312e37226e1f833728a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64d018faf6bfbb39f76c976a5c7c7a4e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64d018faf6bfbb39f76c976a5c7c7a4e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prodir_8h.html#a64d018faf6bfbb39f76c976a5c7c7a4e">MAXEXT</a>&#160;&#160;&#160;_MAX_EXT</td></tr>
<tr class="memdesc:a64d018faf6bfbb39f76c976a5c7c7a4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max file extension size. <br /></td></tr>
<tr class="separator:a64d018faf6bfbb39f76c976a5c7c7a4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a34c915efb231ba61f1c88e12792f6104"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> qfindfirst </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structqffblk64__t.html">qffblk64_t</a> *&#160;</td>
          <td class="paramname"><em>blk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>attr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find first file that matches the pattern. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pattern</td><td>file name pattern, usually with * and ? wildcards </td></tr>
    <tr><td class="paramname">blk</td><td>structure that will hold the answer. blk-&gt;ff_name will hold the file name, for example. </td></tr>
    <tr><td class="paramname">attr</td><td>the desired file types (<a class="el" href="prodir_8h.html#a7a005f0037a09b83890953d02482c4e1" title="Directory. ">FA_DIREC</a> or 0) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if found a file, other values mean error </dd></dl>

</div>
</div>
<a class="anchor" id="a36e876f6d07ce60f6d81013998df084b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> int <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> qfindnext </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structqffblk64__t.html">qffblk64_t</a> *&#160;</td>
          <td class="paramname"><em>blk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find next file that matches the pattern. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">blk</td><td>structure that holds the current state. blk-&gt;ff_name will hold the next file name upon return. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if found the next file, other values mean error </dd></dl>

</div>
</div>
<a class="anchor" id="a4188629837fd5ba62ea616b479cd4a24"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#a8ddba56b40c4be92718f8059abf51147">idaman</a> <a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void <a class="el" href="pro_8h.html#a176294e75f953787714b9d08ffa89adf">ida_export</a> qfindclose </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structqffblk64__t.html">qffblk64_t</a> *&#160;</td>
          <td class="paramname"><em>blk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stop the file enumeration and free internal structures. </p>
<dl class="section note"><dt>Note</dt><dd>there is no need to call this function manually, it is called from the <a class="el" href="structqffblk64__t.html" title="Common structure with 64-bit ff_fsize - see qffblk_t. ">qffblk64_t</a> destructor. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">blk</td><td>file enumeration structure </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
